const schema = {
  point: {
    title: 'point',
    description: 'describes a point',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      location: {
        type: 'array',
        items: {
          type: 'number'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isNew: {
        type: 'boolean',
        default: false
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  line: {
    title: 'line',
    description: 'describes a line',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      start: {
        ref: 'point',
        type: 'string'
      },
      end: {
        ref: 'point',
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      original: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isNew: {
        type: 'boolean',
        default: false
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  rendermaterial: {
    title: 'rendermaterial',
    description: 'describes a rendermaterial',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      id: {
        type: 'string',
        primary: true
      },
      color: {
        type: 'array',
        items: {
          type: 'number'
        }
      },
      transparency: {
        type: 'number'
      },
      lineWeight: {
        type: 'number'
      },
      lineType: {
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  layer: {
    title: 'layer',
    description: 'describes a layer',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      name: {
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      entity: {
        ref: 'entity',
        type: 'string'
      },
      type: {
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  block: {
    title: 'block',
    description: 'describes a block',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      name: {
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      entity: {
        ref: 'entity',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      type: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  polyline: {
    title: 'polyline',
    description: 'describes a polyline',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      vertices: {
        ref: 'point',
        type: 'array',
        items: {
          type: 'string'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  solid: {
    title: 'solid',
    description: 'describes a solid',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      vtx0: {
        ref: 'point',
        type: 'string'
      },
      vtx1: {
        ref: 'point',
        type: 'string'
      },
      vtx2: {
        ref: 'point',
        type: 'string'
      },
      vtx3: {
        ref: 'point',
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  arc: {
    title: 'arc',
    description: 'describes a arc',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      center: {
        ref: 'point',
        type: 'string'
      },
      radius: {
        type: 'number'
      },
      start_point: {
        ref: 'point',
        type: 'string'
      },
      end_point: {
        ref: 'point',
        type: 'string'
      },
      start_angle: {
        type: 'number'
      },
      end_angle: {
        type: 'number'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  ellipse: {
    title: 'ellipse',
    description: 'describes a ellipse',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      center: {
        ref: 'point',
        type: 'string'
      },
      axesLength: {
        ref: 'point',
        type: 'array',
        items: {
          type: 'number'
        }
      },
      angle: {
        type: 'number'
      },
      startAngle: {
        ref: 'point',
        type: 'string'
      },
      endAngle: {
        ref: 'point',
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  circle: {
    title: 'circle',
    description: 'describes a circle',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      center: {
        ref: 'point',
        type: 'string'
      },
      radius: {
        type: 'number'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  text: {
    title: 'text',
    description: 'describes a text',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      id: {
        type: 'string',
        primary: true
      },
      layer: {
        ref: 'layer',
        type: 'string'
      },
      block: {
        ref: 'block',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      content: {
        type: 'string'
      },
      font: {
        type: 'string'
      },
      insert: {
        ref: 'text',
        type: 'string'
      },
      height: {
        type: 'number'
      },
      width: {
        type: 'number'
      },
      rotation: {
        type: 'number'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  opening: {
    title: 'opening',
    description: 'describes a opening',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  window: {
    title: 'window',
    description: 'describes a window',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  door: {
    title: 'door',
    description: 'describes a door',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      material: {
        ref: 'rendermaterial',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  room: {
    title: 'room',
    description: 'describes a room',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      points: {
        type: 'array',
        items: {
          type: 'array',
          items: {
            type: 'number'
          }
        }
      },
      name: {
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      mergeNum: {
        type: 'number'
      },
      apartment: {
        ref: 'apartment',
        type: 'string'
      },
      bim: {
        ref: 'bim',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  // wall: {
  //   title: 'wall',
  //   description: 'describes a wall',
  //   version: 0,
  //   indexes: ['updatedAt'],
  //   type: 'object',
  //   properties: {
  //     data: {
  //       type: 'array',
  //       items: {
  //         type: 'string'
  //       }
  //     },
  //     lines: {
  //       type: 'array',
  //       items: {
  //         type: 'array',
  //         items: {
  //           ref: 'point',
  //           type: 'string'
  //         }
  //       }
  //     },
  //     id: {
  //       type: 'string',
  //       primary: true
  //     },
  //     name: {
  //       type: 'string'
  //     },
  //     room: {
  //       ref: 'room',
  //       type: 'string'
  //     },
  //     definition: {
  //       type: 'string'
  //     },
  //     updatedAt: {
  //       type: 'number',
  //       default: 0
  //     },
  //     isDeleted: {
  //       type: 'boolean',
  //       default: false
  //     }
  //   }
  // },
  drywall: {
    title: 'drywall',
    description: 'describes a drywall',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      lines: {
        type: 'array',
        items: {
          type: 'array',
          items: {
            ref: 'point',
            type: 'string'
          }
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      original: {
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  mainwall: {
    title: 'mainwall',
    description: 'describes a mainwall',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      lines: {
        type: 'array',
        items: {
          type: 'array',
          items: {
            ref: 'point',
            type: 'string'
          }
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      original: {
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  beam: {
    title: 'beam',
    description: 'describes a beam',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      lines: {
        type: 'array',
        items: {
          type: 'array',
          items: {
            ref: 'point',
            type: 'string'
          }
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      bim: {
        ref: 'bim',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  column: {
    title: 'column',
    description: 'describes a column',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      lines: {
        type: 'array',
        items: {
          type: 'array',
          items: {
            ref: 'point',
            type: 'string'
          }
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      bim: {
        ref: 'bim',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  scanstation: {
    title: 'scanstation',
    description: 'describes a scanstation',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      point: {
        type: 'array',
        items: {
          type: 'number'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      bim: {
        ref: 'bim',
        type: 'string'
      },
      drywalls: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      mainwalls: {
        type: 'array',
        items: {
          type: 'string'
        }
      },
      definition: {
        type: 'string'
      },
      createdAt: {
        type: 'number',
        default: 0
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  separator: {
    title: 'separator',
    description: 'describes a separator',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      line: {
        type: 'array',
        items: {
          type: 'number'
        }
      },
      id: {
        type: 'string',
        primary: true
      },
      name: {
        type: 'string'
      },
      asDoor: {
        type: 'boolean',
        default: false
      },
      room: {
        ref: 'room',
        type: 'string'
      },
      bim: {
        ref: 'bim',
        type: 'string'
      },
      definition: {
        type: 'string'
      },
      createdAt: {
        type: 'number',
        default: 0
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  auto_plan_task: {
    title: 'auto_plan_task',
    description: 'describes a auto_plan_task',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      scanstation: {
        ref: 'scanstation',
        type: 'string'
      },
      result: {
        type: 'string'
      },
      roomNo: {
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  apartment: {
    title: 'apartment',
    description: 'describes a apartment',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      name: {
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      bim: {
        ref: 'bim',
        type: 'string'
      },
      num: {
        type: 'number'
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  polylinechildren: {
    title: 'polylinechildren',
    description: 'describes a polylinechildren',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      data: {
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  bim: {
    title: 'bim',
    description: 'describes a bim',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      name: {
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  entity: {
    title: 'entity',
    description: 'describes a entity',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      name: {
        type: 'string'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  boundingbox: {
    title: 'boundingbox',
    description: 'describes a boundingbox',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      type: {
        type: 'string'
      },
      maxX: {
        type: 'number'
      },
      minX: {
        type: 'number'
      },
      maxY: {
        type: 'number'
      },
      minY: {
        type: 'number'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  },
  change: {
    title: 'change',
    description: 'describes a change',
    version: 0,
    indexes: ['updatedAt'],
    type: 'object',
    properties: {
      type: {
        type: 'string'
      },
      x: {
        type: 'number'
      },
      y: {
        type: 'number'
      },
      f: {
        type: 'number'
      },
      minX: {
        type: 'number'
      },
      minY: {
        type: 'number'
      },
      id: {
        type: 'string',
        primary: true
      },
      definition: {
        type: 'string'
      },
      updatedAt: {
        type: 'number',
        default: 0
      },
      isDeleted: {
        type: 'boolean',
        default: false
      }
    }
  }
}

export default schema
